/******************************************************************************/
/* modbus.h                                                                   */
/*                                                                            */
/* Based on "libmodbus-2.0.3" - Unix\Win version                              */
/* Author: Stephane Raimbault <stephane.raimbault@gmail.com>                  */
/*                                                                            */
/* Modifed for embedded system 02.2011 Sergei Maslyakov <rusoil.9@gmail.com>  */
/******************************************************************************/


#ifndef __MODBUS_H
#define __MODBUS_H


#include "modbus_def.h"



/**************************** Func declarations *******************************/
sint32_t OpenMbMaster(const uint32_t _baudrate, const uint8_t _key,
                      const uint8_t _slave, const uint8_t _func);

void CloseMbMaster();

sint32_t Modbus_make_query(const __MB_QUERY_BUILD * const _pQueryData);

sint32_t Modbus_receive(const uint8_t _byte);

sint32_t Modbus_process_answ();


#endif